﻿<%@ Page Title="" MasterPageFile="~/BackOffice.master" Language="C#" AutoEventWireup="true" CodeBehind="FileManager.aspx.cs" Inherits="MakeIT.Deo.Apresentacao.FileManager" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<%@ Register Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>


<asp:Content ID="cMain" ContentPlaceHolderID="cphMain" runat="server">
<div class="art-Block">
        <div class="art-Block-body">
            <div class="art-BlockHeader">
                <div class="l"></div>
                <div class="r"></div>
                <div class="art-header-tag-icon">
                    <div class="t">Gerenciador de arquivos</div>
                </div>
            </div>
            <div class="art-BlockContent">
                <div class="art-BlockContent-tl"></div>
                <div class="art-BlockContent-tr"></div>
                <div class="art-BlockContent-bl"></div>
                <div class="art-BlockContent-br"></div>
                <div class="art-BlockContent-tc"></div>
                <div class="art-BlockContent-bc"></div>
                <div class="art-BlockContent-cl"></div>
                <div class="art-BlockContent-cr"></div>
                <div class="art-BlockContent-cc"></div>
                <div class="art-BlockContent-body">

    <div style="width: 100%;">
        <table width="100%" cellpadding="0" cellspacing="0" border="1" style="vertical-align:top; text-align:left;">
            <tr>
                <td style="vertical-align:top;">

                   <asp:Panel ID="panel1" runat="server">

                        Documentos públicos
                        <table width="100%">
                            <tr>
                                <td>
                                    Enviar Arquivo:
                                </td>
                                <td>
                                    <asp:FileUpload ID="FileUpload1" runat="server" Width="300" />&nbsp;
                                    <asp:Button ID="ButtonEnviar1" runat="server" Text="Enviar" OnClick="ProcessUploadPublico" ValidationGroup="Salvar"/>
                                    <asp:ConfirmButtonExtender ID="ConfirmButtonExtender2" runat="server" TargetControlID="ButtonEnviar1" ConfirmText="Confirma o envio do arquivo?">
                                    </asp:ConfirmButtonExtender>
<%--                                            <asp:FileUpload ID="AsyncFileUpload1" runat="server"  UploadingBackColor="Yellow" 
                                                    OnUploadedComplete="" OnClientUploadComplete="showUploadConfirmation"
                                                    ThrobberID="LabelMensagem" Width="300px"/>--%>                                        </td>
                            </tr>
                            <tr>
                                <td>
                                    Coment&aacute;rio:
                                </td>
                                <td colspan="3">
                                    <asp:TextBox ID="TextBoxComentario" runat="server" MaxLength="100" Width="300px"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBoxComentario"
                                          Display="None" ErrorMessage="Favor informar o comentário sobre o arquivo" ValidationGroup="Salvar" />
                                    <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" TargetControlID="RequiredFieldValidator2"/>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    Data In&iacute;cio:
                                </td>
                                <td>
                                    <asp:TextBox ID="txtCadDtInicio" runat="server" Enabled="true"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvtxtCadDtInicio" runat="server" ControlToValidate="txtCadDtInicio"
                                        ErrorMessage="Favor informar o início da vigência" ValidationGroup="Salvar" display="None"/>
                                    <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" TargetControlID="rfvtxtCadDtInicio"/>
                                    <asp:ImageButton ID="imgtxtCadDtInicio" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/Calendario.png" />
                                    <asp:CalendarExtender ID="txtCadDtInicio_CalendarExtender" runat="server" DaysModeTitleFormat="dd/MM/yyyy"
                                        Enabled="True" TargetControlID="txtCadDtInicio" BehaviorID="imgtxtCadDtInicio"
                                        PopupButtonID="imgtxtCadDtInicio" Format="dd/MM/yyyy" TodaysDateFormat="dd/MM/yyyy" PopupPosition="TopLeft">
                                    </asp:CalendarExtender>
                                </td>
                                <td>
                                    Data Fim:
                                </td>
                                <td>
                                    <asp:TextBox ID="txtCadDtFim" runat="server" Enabled="true"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtCadDtFim"
                                        ErrorMessage="Favor informar o fim da vigência" ValidationGroup="Salvar" display="None"/>
                                    <asp:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" TargetControlID="RequiredFieldValidator1"/>
                                    <asp:ImageButton ID="imgtxtCadDtFim" runat="server" ImageUrl="~/App_Themes/Padrao/Imagens/backoffice/Calendario.png" />
                                    <asp:CalendarExtender ID="txtCadDtFim_CalendarExtender" runat="server" DaysModeTitleFormat="dd/MM/yyyy"
                                        Enabled="True" TargetControlID="txtCadDtFim" BehaviorID="imgtxtCadDtFim" PopupButtonID="imgtxtCadDtFim"
                                        Format="dd/MM/yyyy" TodaysDateFormat="dd/MM/yyyy" PopupPosition="TopLeft">
                                    </asp:CalendarExtender>
                                </td>
                            </tr>

                            <tr>
                                <td colspan="4">
                                    <asp:Label ID="LabelMensagem" runat="server" Text=""></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="4">
                                    <asp:GridView ID="grvPublicos" runat="server" AutoGenerateColumns="False" EmptyDataText="N&atilde;o existem documentos públicos.">
                                        <Columns>
                                            <asp:TemplateField>
                                                <ItemTemplate>
                                                    <asp:ImageButton ID="imgbExcluir" runat="server" OnClick="imgbExcluir_Click"
                                                        ImageUrl="~/App_Themes/Padrao/imagens/backoffice/excluir.gif" CommandArgument='<%#Eval("idDocumento") %>' />
                                                </ItemTemplate>
                                                <ItemStyle HorizontalAlign="Center" />
                                            </asp:TemplateField>
                                            <asp:BoundField DataField="IdDocumento" HeaderText="ID"/>
                                            <asp:BoundField DataField="DataVigenciaInicio" HeaderText="Dt Início" DataFormatString="{0:dd/MM/yyyy}"/>
                                            <asp:BoundField DataField="DataVigenciaFim" HeaderText="Dt Término" DataFormatString="{0:dd/MM/yyyy}"/>
                                            <asp:BoundField DataField="NomeArquivo" HeaderText="Nome" />
                                            <asp:BoundField DataField="TamanhoArquivo" HeaderText="Tamanho" DataFormatString="{0:N0}"/>
                                            <asp:BoundField DataField="Mime" HeaderText="Tipo" />
                                            <asp:BoundField DataField="Comentario" HeaderText="Coment&aacute;rio" />
                                            <asp:BoundField DataField="Edicao" HeaderText="Envio" DataFormatString="{0:dd/MM/yyyy}"/>
                                            <asp:BoundField DataField="EditadoPor" HeaderText="Enviado por" />
                                            
                                        </Columns>
                                    </asp:GridView>
                                </td>
                            </tr>
                        </table>
                    </asp:Panel>
                </td>
            </tr>
        </table>

    </div>

                </div>
            </div>
        </div>
    </div>
</asp:Content>




